#encoding=utf-8

import commands
from com.utls.pro_env import *

class SqoopUtil(object):
    '''
    sqoop operation
    '''

    def __init__(self):
        pass

    @staticmethod
    def execute_shell(shell, sqoop_path=SQOOP_PATH):
        status, output = commands.getstatusoutput(SQOOP_PATH+shell)
        print status, output
        if status != 0:
            return None
        else:
            print "success"

        output = str(output).split("\n")

        return output